Fireworks Article

Creating a Layout with Fireworks MX 2004 and Dreamweaver MX 2004

Joey Durham

www.ultraweaver.com
www.geekforum.com
www.teamworksmedia.com

This article does not focus on new features of Macromedia Fireworks MX 2004 or Macromedia Dreamweaver MX 2004. It is an example of how both products together offer a powerful solution when designing and programming websites quickly.

The article will take you through the process of designing a web layout from beginning to end using Fireworks MX 2004 and Dreamweaver MX 2004. Even though the article is based on the new versions of both products, you should have no problem using this article with Fireworks MX and Dreamweaver MX.

The example layout in this article is Ultraweaver.com. I wanted to use this as an example to show how you can create a site, but I also wanted to show how complex you can get with designing in Fireworks. In my opinion, Fireworks is more than a button, navbar, and photo editor. You can create full layouts in Fireworks that you can export as HTML or even CSS.

Because I wanted to use Ultraweaver.com as the example and I am not doing a "traditional style" web layout, I have also included sample projects in the source files that reflect a more traditional style layouts.You can also download the sample files from the beginning of this article. You can apply the same process discussed in this article to the traditional style examples.

Before you begin, it is important that you are already familiar with the Fireworks and Dreamweaver tool sets. You should also have a basic knowledge of HTML. With that said, let's get started.

Requirements

To complete this tutorial you will need to install the following software and files:

Fireworks MX 2004

Dreamweaver MX 2004


Tutorials and sample files:

Creating the Ultraweaver Design

When designing web pages in Fireworks, you need to keep a few things in mind.

  1. You do not want to rely on Fireworks solely for HTML web page creation. Fireworks is a tool that can export HTML, but is not meant as a web page creation tool on its own.
  2. You want to be flexible enough in your design that you are not creating huge graphic files or a design that limits you on how much content you can place within it. A technique developers and designers often use is to create tiled images to expand/contract your designs. I discuss this process further in the Slicing section later in this article.

Before starting any project, you should have a pretty good idea of what you want to create. You may want to sketch out your idea on paper or in Fireworks. In the case of Ultraweaver, I wanted a layout that was similar to a handheld device. I started by shaping the outline in Fireworks. Once I had a shape, I started adding effects and gradients to give the shape outline some depth. You can view the completed interface by opening the interface.png file in the source files downloadable from the beginning of this article. This will let you poke around and use the file as a reference if you run into any trouble.

Let's start by creating the shape outline as shown in the Figure 1 below.

The body shape outline

Figure 1. The body shape outline

Create a new document in Fireworks MX 2004.

  1. Go to the main menu and select File > New. The New Document dialog box appears. Insert the following values:
    • Width: 630 Pixels
    • Height: 330 Pixels
    • Resolution: 72
    • Set the Canvas color to Custom and enter a value of #ECE9D8
    • Click OK
  2. Go to the menu again and select File > Save and name the document myinterface.png.

Creating the Shape Outline

The first shape you need to create as part of the shape outline is shown below.

Creating the body shape outline

Figure 2. Creating the body shape outline

  1. Go to the Tools panel and select the Rectangle tool.
  2. On the canvas, create a new rectangle with the following attributes.
    • Width: 600 Pixels
    • Height: 176 Pixels
    • Fill: Solid with a color of #336699
    • Center the rectangle on the canvas.
  3. On the Tools panel, select the Subselection tool (the white arrow icon) and then select the rectangle.

Whenever you select an object, you will notice at each corner there are small squares. These are anchor points. These will be used to reshape the rectangle.

Anchor points

Figure 3. Anchor points

Before you can start reshaping, ungroup the rectangle. If you do not do this, you will be unable to edit the rectangle's shape with the anchor points.

  1. Select the rectangle and click the bottom left anchor. A dialog box appears to notify you that you must ungroup the points so that you can edit them. Click OK. Notice that the point that you selected is no longer white and has turned light blue. This means that you have selected the anchor point you can edit it.

    Note: This is just one way to ungroup a vector object. You can also do this by selecting the object and then going to the main menu and selecting Modify > Ungroup.

  2. With the bottom left anchor point still selected, move it 12 pixels to the right with the Arrow key on your keyboard.

    Note: While holding down the Shift key and using the Arrow keys on your keyboard, you can move objects and anchor points in increments of 10 pixels.

  3. Select the bottom right anchor and move it 12 pixels to the left with the Arrow key on your keyboard.

  4. You now have trapezoid that looks like figure 4.

    Reshaping the trapeziod with the pen tool

    Figure 4. Reshaping the trapezoid with the pen tool

  5. Select the trapezoid, go to the Tools panel, and select the Pen tool.
  6. Click the top left anchor point and then hold down the mouse button while dragging the mouse until you have a similar outline as shown in figure 5 below. Once you do, release the mouse button.

    Reshaping the trapezoid with the Pen tool

    Figure 5. Reshaping the trapezoid with the Pen tool

Not only have you reshaped the rectangle but the process also added handles to the anchor point. You can use these handles to further help you shape vectors.

To edit the anchor point with its handles, go to the Tools panel, use the Subselection tool, and click either end of the handles. Ensure that you click the end of the handle (and not the handle itself). Try to adjust it so that you have something similar to the figure 5 above. Don't worry if you don't get it perfect. Just get it as close to the shape as you can.

Note: To edit anchor points and/or its handles, you must use the Subselection tool (the white arrow in the Tools Panel).

Now you need to fix the right side of the edited shape. However, instead of repeating the process and trying to get the right side to match the left, you can take a quick shortcut and avoid this tedious task.

  1. With the Subselection tool, select the top right anchor point.
  2. Press and hold the Shift key and press the Up Arrow three times on your keyboard. This moves the anchor up 30 pixels.
  3. Create a new rectangle
    • Width: 280 pixels
    • Height: 234 pixels
    • Fill: Solid with a color of #DD0000
  4. Place the new rectangle so that it covers the right side of the edited shape, like Figure 6 below.

    Creating the new rectangle

    Figure 6. Creating the new rectangle

  5. Select both the rectangle and the irregular shape. You can do this by holding down the Shift key on the keyboard while selecting the two shapes on the canvas.
  6. Go to the main menu and select Modify > Combine Paths > Punch. This removes the right side completely as shown in Figure 7 below.

    Removing the right side of the trapezoid with the punch command

    Figure 7. Removing the right side of the trapezoid with the punch command

  7. Select the punched shape, go to the main menu, and select Edit > Clone.
  8. With the clone selected, go to the main menu and select Modify > Transform > Flip Horizontal.
  9. Move the cloned shape to the right to even out the left and right side of the interface.

    Line it up so that both the left and right side equal 610 pixels wide when selected together. Figure 8 below shows both the left and right side selected. If the widths do not equal 610 pixels, adjust the right side until they are equal.

    Making the right and left sides symmetrical

    Figure 8. Making the right and left sides symmetrical

    The Property inspector showing the width at 610 pixels wide when both sides are selected.

    Figure 9. The Property inspector showing the width at 610 pixels wide when you select both sides.

  10. Once you have changed the width, select both sides, go to the main menu, and select Modify > Combine Paths > Union. This combines both sides and makes it one object.

You have now completed the shape. Your shape will look like figure 10 below.

The completed shape

Figure 10. The completed shape

Because this is a "How to" article and you are working on an irregular shape and you have modified anchors and its handles, you may have a slightly different version then what I may have. There is really no precise way to translate handle movements. To continue, it is important that you are working with the same exact file, as this will effect instructions later on in the article. Save and close your work and open the following file from the sample file download: shape.png.

Let's finish up the shape outline.

  1. Create a new rectangle with the following properties.
    • Width: 570 pixels
    • Height: 120 pixels
    • Rectangle Roundness: 10
  2. Select the rectangle, go to the Align panel, select Align Horizontal Center, and Align Bottom Edge. You can access the Align panel by going to the main menu and selecting Window > Align.

    Using the align panel to align the rectangle

    Figure 11. Using the align panel to align the rectangle

  3. With the rectangle still selected, move the rectangle up 10 pixels with the up Arrow on you keyboard.
  4. Select both shapes, go to the main menu, and select Modify > Combine Paths > Union.

That completes the shape outline, which looks like Figure 12 below.

The body shape outline

Figure 12. The body shape outline

Adding Content Areas

Now that you have completed the shape outline, you can layout content areas. These are the areas on the shape that will have HTML elements.

You are now going to create three new rectangles.

  1. Draw the first rectangle (Main Content) with the following properties and set it to the side.
    • Width: 392
    • Height: 191
    • Fill color: #FFFFFF
    • Stroke: 1 pixel soft with a color of #3D5C98
    • Rectangle Roundness: 5

     

    Select the Main Content shape and go to the Property inspector and place it at the X and Y coordinates at the lower left as shown in Figure 13 below.

    Setting the X and Y coordinates of the main content shape

    Figure 13. Setting the X and Y coordinates of the main content shape

  2. Draw the second rectangle (Right Column) with the following properties and set it to the side.
    • Width: 160
    • Height: 191
    • Fill color: #FFFFFF
    • Stroke: 1 pixel soft with a color of #3D5C98
    • Rectangle Roundness: 6

     

    Select the Right Column shape and go to the Property inspector and place it at the X and Y coordinates as shown at the lower left in figure 14 below.

    getting the X and Y coordinates of the right column

    Figure 14. Setting the X and Y coordinates of the right column

  3. Draw the third rectangle (Navbar) with the following properties.
    • Width: 558
    • Height: 43
    • Fill color: #FFFFFF
    • Stroke: 1 pixel soft with a color of #3D5C98
    • Rectangle Roundness: 22

     

    Select the Navbar shape and go to the Property inspector and place it at the X and Y coordinates shown at the lower left.

    Setting the X and Y coordinates of the Navbar

    Figure 15. Setting the X and Y coordinates of the Navbar

That completes the content areas.

Fills and Effects

Now you get to the fun part of giving the interface depth with Fills and Effects. Before you dive in, I feel it is important to mention that the methods that I used to create the effects in the remainder of this article are by no means the only way to create these effects. These are merely the way I chose to create these effects. I love to experiment with effects and to see what method produces the result best. I encourage you to experiment with creating effects. In fact, you may go through the methods I used to create a certain effects and find that you prefer another method. There is no right or wrong way. So, with that said, let's get started.

Adding Shadow and Color Fill

  1. Select the shape outline and apply the following properties.

    Fill: Linear Gradient with a color of #FFFFFF and #5176BB and align the color sliders as shown in Figure 16 below.

    Setting a linear gradient and color for the Fill

    Figure 16. Setting a linear gradient and color for the Fill

  2. With the outline shape still selected, go to the Toolbar and select the Paint Bucket tool. Handles will appear on the shape outline. Use these to adjust the color fill of the gradient so that it looks like Figure 17 below. The round end of the handles moves the gradient. The square end of the handle changes the direction of the gradient.

    Adjusting the color fill of the gradient

    Figure 17. Adjusting the color fill of the gradient

  3. Select the shape outline, go to the main menu, and select Edit > Clone.
  4. With the clone selected, go to the Property inspector and change the fill color to Solid with a color of #555555.
  5. Still in the Property inspector, click the Effect + symbol, choose Blur > Gaussian Blur, and set the Blur Radius to 1.5.
  6. With the clone still selected, go to the main menu and select Modify > Arrange > Send To Back.

As shown in steps 3, 4, 5, and 6, I chose to use this method to produce a glow/shadow effect around the interface. Although there is an effect called Glow which does a similar job quicker, I chose the Clone/Gaussian Blur method as I think it better illustrates the effect of a slight shadowed glow around the shape outline.

We will use the Clone/Gaussian Blur method on our three content areas as well to create another glow effect like in the previous step. Again, I could use the Glow effect in the Property inspector, but in this case, I think it better illustrates the effect of a glow around the content areas.

Navbar

  1. Select the Navbar content area.
  2. Go to the main menu and select Edit > Clone.
  3. With the clone still selected, go to the Property inspector and make the following changes:
    • Set the color fill to None.
    • Change the stroke color to #FFFFFF.
    • Change the Width to 560 pixels.
    • Change the Height to 45 pixels.
    • Change X Coordinate to 35.
    • Change the Y Coordinate to 58.
    • Click the Effects + symbol and choose Blur > Gaussian Blur and set the Blur Radius to 1.0.
    • Click OK.
    • Go to the main menu and select Modify > Arrange > Send Backward.

The Navbar should look something like figure 18 below.

The NavBar with Fill and Effects applied

Figure 18. The NavBar with Fill and Effects applied

Main Content Area

  1. Select the "Main Content" area.
  2. Go to the main menu and select Edit > Clone.
  3. With the clone still selected, go to the Property inspector and make the following changes:
    • Set the color fill to None.
    • Change the stroke color to #FFFFFF.
    • Change the Width to 394 pixels.
    • Change the Height to 193 pixels.
    • Change X Coordinate to 35.
    • Change the Y Coordinate to 122
    • .
    • Click the Effects + symbol and choose Blur > Gaussian Blur and set the Blur Radius to 1.0
    • .
    • Click OK.
    • Go to the main menu and select Modify > Arrange > Send Backward.

Right Column Content Area

  1. Select the Right Column content area.
  2. Go to the main menu and select Edit > Clone.
  3. With the clone still selected, go to the Property inspector and make the following changes:
    • Set the color fill to None.
    • Change the stroke color to #FFFFFF.
    • Change the Width to 162 pixels.
    • Change the Height to 193 pixels.
    • Change X Coordinates to 433.
    • Change the Y Coordinates to 122.
    • Click the Effects "+" symbol and choose Blur > Gaussian Blur and set the Blur Radius to 1.0.
    • Click OK.
    • Go to the main menu and select Modify > Arrange > Send Backward.

The final result on all content areas will look like Figure 19 below.

The final content areas

Figure 19. The final content areas

Adding the Glass Effects

You create glass effects by using light colors and transparencies. Let's start at the top of the interface and work your way down.

In the Figure 20 below, the selected object is the shape/effect we will create next.

The selected the object for the Glass Effect you will create

Figure 20. The selected the object for the Glass Effect you will create

I created the irregular shape with the Pen tool. Essentially, you play connect the dots only without the dots. To demonstrate, Figure 21 below shows anchor points in the order I created them.

The ordered anchor points for creating the irregular shape

Figure 21. The ordered anchor points for creating the irregular shape

Note: It may take a couple of tries to get the hang of using the Pen tool but once you do, you will probably start using the Pen tool more often. It is very handy.

  1. Go to the Toolbar and select the Pen tool. Place the first anchor at the top left as illustrated in step one in Figure 21 above by clicking and releasing the mouse button.
  2. Place the second anchor point at the top and in the center of the interface. Before releasing the mouse button, drag the mouse to the right so that the guideline of the Pen tool follows the top left curve of the interface like the image below.

    Setting the first two anchor points at the top of the interface

    Figure 22. Setting the first two anchor points at the top of the interface

  3. Place the third anchor at the top right, as shown below by clicking and releasing the mouse button.

    Setting the third anchor point at the top of the interface

    Figure 23. Setting the third anchor point at the top of the interface

  4. Place the fourth anchor at the top right but just to the lower left of the third anchor as shown in Figure 24 below by clicking and releasing the mouse button.

    Setting the fourth anchor point at the top of the interface

    Figure 24. Setting the fourth anchor point at the top of the interface

  5. Place the fifth anchor in the location as shown in figure 25 below, but this time drag the mouse to create handles.

    Setting the fifth anchor point at the top of the interface

    Figure 25. Setting the fifth anchor point at the top of the interface

  6. When all five anchors are in place, simply click the very first anchor point you created. This will close the path so you can add a fill color to the new shape you created.
  7. With the new shape selected, go to the Property inspector and set the following properties.
    • Remove the stroke by selecting None in the stroke's pop-up menu.
    • Set the fill to Linear Gradient with a color of #FFFFFF and #5176BB. Then, set the opacity of the fill color #5176BB to 0 as shown in Figure 26 below.

      Setting the Fill color, gradient, and opacity

      Figure 26. Setting the fill color, gradient, and opacity

      Similar to when you added the Linear Gradient to the shape outline of the interface earlier in this article, you will adjust the fill with the new shape.

  8. With the shape still selected, go to the Toolbar and select the Paint Bucket tool.
  9. Adjust the Paint Bucket Fill handles so that it looks similar to Figure 27 below.

    Adjusting the Paint Bucket Fill handles

    Figure 27. Adjusting the Paint Bucket Fill handles

    Adjust it as necessary to get the desired effect. The new shape should be slightly lighter in color then the interface itself.

    This completes the first glass effect.

    Start on the left side of the Ultraweaver.com interface and create the effect along its side. But first, take a look at the two selected shapes you will create in Figure 28 below.

    The completed shapes you will create on the left side of the interface

    Figure 28. The completed shapes you will create on the left side of the interface

  1. Select the Rectangle tool from the Toolbar.
  2. Draw a rectangle so that it is roughly the width of the side of the interface and a height of 100 pixels. This does not need to be exact. You will be editing its size and shape.
  3. Move the rectangle so that it covers two-thirds of the top left side of the interface. It should look similar to Figure 29 below.

    Moving the rectangle so it covers 2/3rds of the top left side

    Figure 29. Moving the rectangle so it covers two-thirds of the top left side

  4. With the rectangle still selected, use the Subselection tool and click any of the anchor points to ungroup the rectangle.
  5. In the Toolbar, select the Pen tool and edit the bottom left anchor point so that the left edge of the rectangle follows the contour of the left edge of the interface, as shown in Figure 30 below.

    Modifying the bottom left anchor point

    Figure 30. Modifying the bottom left anchor point

For now, leave the edited rectangle as is. You will now add another rectangle that you will put below the top left object you just created.

  1. Select the Rectangle tool from the Tools panel.
  2. Draw a rectangle so that it is roughly the width of the side of the interface and a height of about 70 pixels. This does not need to be exact. You will edit its size and shape.
  3. Move the rectangle so that it sits below the first edited rectangle. It should look similar to Figure 31 below.

    Moving the second rectangle below the first one

    Figure 31. Moving the second rectangle below the first one

  4. With the rectangle still selected, use the Subselection tool and click any of the anchor points to ungroup the rectangle.
  5. Move the bottom left anchor point to the right so that it sits at the edge of the interface.
  6. Select the Pen tool and select the bottom left anchor again. This time, adjust the left edge of the rectangle so that it follows the contour of the left edge of the interface as shown below.

    Adjusting the left side of the second rectangle to follow the contour of the left edge of the interface

    Figure 32. Adjusting the left side of the second rectangle to follow the contour of the left edge of the interface

    Because there is no precise method of translating exact movements that I make when using the Pen tool, you will need to edit the two shapes so that they look like Figure 33 below.

    The final shape of the two rectangles on the left side of the interface

    Figure 33. The final shape of the two rectangles on the left side of the interface

Once you have edited the two shapes, add a gradient to each shape

  1. Select the top left edited rectangle.
  2. Go to the Property inspector and set the following properties.
    • Fill: Linear Gradient with a color of #C7CFE0 and #5176BB.
    • Set the color #5176BB opacity to 0 as shown in Figure 34 below.

      Setting the Fill properties of the top rectangle in the left side of the interface

      Figure 34. Setting the Fill properties of the top rectangle in the left side of the interface

  3. With the edited rectangle still selected, go to the Toolbar and select the Paint Bucket tool. Move the Paint Bucket handle so that it is positioned like Figure 35 below.

    Positioning the Paint Bucket handle

    Figure 35. Positioning the Paint Bucket handle

  4. Select the bottom left rectangle
  5. Go to the Property inspector and set the following properties.
    • Fill: Linear Gradient with a color of #91A0C7 and #FFFFFF.
  6. With the edited rectangle still selected, go to the Toolbar and select the Paint Bucket tool. Move the Paint Bucket handle so that it is positioned like figure 36 below.

    Positioning the Paint Bucket handle

    Figure 36. Positioning the Paint Bucket handle

That completes the left side of the interface.

You do not need to repeat the steps on the left side of the interface for the right side. Instead, you can clone the shapes and reuse them for placement on the right side of the interface.

  1. Select the top and bottom edited rectangles you just made. The easiest way to do this is to press and hold down the Shift key on your keyboard and select each object.
  2. With both objects selected, go to the main menu and select Edit > Clone.
  3. Go to the main menu again and select Modify > Transform > Flip Horizontally.
  4. Move the selected items and position them on the right side of the interface. Ensure that the Y coordinate of the objects is the same for both sides.

You should now have a complete layout of the Ultraweaver.com interface similar to Figure 37 below.

The complete layout of the Ultraweaver.com interface

Figure 37. The complete layout of the Ultraweaver.com interface

This concludes, the Creating the Ultraweaver Design section. You can experiment with what you have done so far by adding additional effects.

Slicing

In the beginning of the previous section, Creating the Ultraweaver Design, I talked about some things that you want to keep in mind when designing layouts in Fireworks. One of those items was being flexible enough in your design that you are not creating huge graphic files or a design that limits you on how much content you can place within it.

To give you an example, if you were to export the Ultraweaver design as one graphic file and import it into a web page, you would run into several problems: the graphic would be fairly large in file size and you would also have to include your content in the graphic itself. This would bring up even more issues, such as accessibility, content management, search engine ranking, and so forth.

With slicing, you can eliminate all the problems mentioned above as long as you stay flexible in your design. To better help understand what I mean, let's look at the layout created in the previous section with slices in place, as shown in Figure 38 below.

Slices for the completed interface

Figure 38. Slices for the completed interface

I placed key slices so that I do not limit myself when it comes time to export the Fireworks HTML. The Navbar, Main Content, and Right Column slices are where I will place my content when it comes time to edit the layout in Dreamweaver. I will use the left and right tiles so that as I add content, the interface expands vertically.

Note: I have presliced the interface.png. In real life it may take several attempts at slicing a layout. The only way to get the slicing right is by planning ahead the best you can and then exporting the Fireworks HTML for editing. I generally edit the HTML in Dreamweaver so that the HTML will allow me to add content and tile predefined images (left, middle, and right tiled slices in Figure 38 above). Sometimes I may need to go back and reslice, export, and edit them in Dreamweaver until the slicing helps me edit the HTML and maintain my layout.

Let's skip the wordy explanations and actually see what is happening. Instead of using the layout, you created in the previous section, you will use the file I have supplied in the source downloads named interface.png. This file is already sliced.

Exporting Fireworks HTML

  1. Open the file interface.png.
  2. Go to the main menu and select File > Export
  3. The Export dialog box appears. Create a new folder (in any directory you wish) and name it site.
  4. Create another folder inside the site folder and name it assets.

    The Export dialog box

    Figure 39. The Export dialog box

As you can see from Figure 39 above, you have several options to choose from.

In the Export dialog box, set the following properties.

  1. Filename: layout.htm
  2. Save as type: HTML and Images.
  3. HTML: Export HTML File
  4. Slices: Export Slices
  5. Check the box to Include areas without slices.
  6. Check the box to Put images in subfolder.

Click the Options button. The HTML Setup dialog box appears.

  1. Select the Table tab.
  2. Change the Space with pop-up menu to Nested tables, no spacers.
  3. Click OK.

    The HTML Setup dialog box

    Figure 40. The HTML Setup dialog box

The HTML Setup will export the Fireworks HTML as nested tables with no spacers. I find that using this option when exporting layouts as nested tables makes editing in Dreamweaver much easier. The "Editing in Dreamweaver" section later in this article will explain this a bit further. For now, go ahead and save the Fireworks HTML in the assets folder you created and save the interface.png file.

In this section, you sliced and exported the interface.png file as Fireworks HTML. I probably posed more questions then answers, but you need not worry. The next section, Importing and Editing Fireworks HTML in Dreamweaver, will hopefully answer the questions you may have about slicing.

Importing and Editing Fireworks HTML in Dreamweaver

In the previous section, I had sliced the interface.png for you, and then you exported the file as Fireworks HTML. You will now edit the Fireworks HTML using Dreamweaver.

Create a New Site Definition

  1. Open Dreamweaver MX 2004.
  2. On the startup screen under the Create New column, select Dreamweaver Site….
  3. Select the Basic tab on the Site Definition dialog box.
  4. Name the site Interface and click Next.
  5. Select the radio button No, I do not want to use server technology and click Next.
  6. Select the radio button Edit local copies on my machine, then upload to server when ready. Browse to the folder where you created the folder called site and click Next.
  7. Set the How do you want to connect to your remote server? to Local/Network. Then, browse to the same site folder as you did in step 6 and click Next.
  8. Select the radio button No, do not enable check in and check out and click Next.
  9. You can review your site definition. If all looks well, click Done.

Your directory structure in Dreamweaver should look like Figure 41 below.

The Files panel showing the directory structure for the Dreamweaver site

Figure 41. The Files panel showing the directory structure for the Dreamweaver site

Warning!—Fireworks MX 2004 Only There is an issue in Fireworks MX 2004 that may export incomplete HTML tags when exporting with the option of “Nested Tables – No Spacers” as we have done in this article. If this happens to you, it will be necessary to perform the following steps to fix the error. The symptoms are borders around tables when previewing the HTML file, as well as, Table cell padding and borders show as “undefined” rather then “0” when viewing the code. See Figures 41a and 41b below.

When previewing in a browser the Fireworks MX 2004 HTML shows borders around tables due to the incomplete HTML.

Figure 41a. When previewing in a browser the Fireworks MX 2004 HTML shows borders around tables due to the incomplete HTML.

Code view of the incomplete HTML

Figure 41b. Code view of the incomplete HTML

To fix the invalid HTML, you will need to remove the “undefined” value from all related tags and replace with “0” (zero).

  1. In Dreamweaver go to the main menu and select Edit>Find and Replace
  2. In the Find and Replace dialogue box set the following properties as shown in figure 41c.
  3. Use these settings to remove the “undefined” text and replace with “0”.

    Figure 41c. Use these settings to remove the “undefined” text and replace with “0”

  4. Once you have entered the settings go ahead click the Replace All button.

The above 3 steps will fix the code that was exported from Fireworks MX 2004.

Creating a New HTML Page and Importing the Fireworks HTML

From here, you could edit the layout.htm page that Fireworks had exported but I do not recommend it. Instead, I recommend creating a new file and then importing the Fireworks HTML into the new document. The reason for this is if you edit your layout.htm file and then you decide that you need to go back to Fireworks to make a change to a gradient or you want to add a logo at the top, you will end up undoing any editing that you have done to the HTML in the layout.htm file when you export the Fireworks HTML again. By creating a new file and importing the Fireworks HTML, you will not overwrite any edits you make to the HTML.

Note: You can make changes to the interface in Fireworks such as adding a logo or changing a color of a gradient, but if you change the slicing at all, you will need to change all pages you have edited. Fireworks creates the HTML based on how it is sliced, which is by table rows and columns. If you change the slicing of the Fireworks file and export again, you will end up with slices that do not match the correct rows and columns of the edited HTML pages.

  1. On the start up screen under the Create New column, select HTML. This will create a new HTML document.
  2. Save the document (File > Save). Name the file index.htm and save it in the root directory of your site.
  3. Go to the main menu and select Insert > Image Object > Fireworks HTML.
  4. The Insert Fireworks HTML dialog box appears. Browse to the layout.htm page and select OK. The interface should now be in your new index.htm page.
  5. Go to the main menu and select Modify > Page Properties.
  6. In the Page Properties dialog box, set the background color to #ECE9D8 and click OK.

Now that you have imported your interface into your new page, you can start editing the HTML Fireworks created for you.

Removing Sliced Images

You need to remove some of the sliced images, namely the Navbar, Main Content, and the Right Column sliced images. Once you remove these, you can use these areas for your content, but before you do, you need to prepare the tables that will be affected by removing the sliced images.

  1. Select the sliced image Navbar as shown in Figure 42 below.

    The selected Navbar sliced image

    Figure 42. The selected Navbar sliced image

  2. With the Navbar sliced image selected, look at the bottom of the document where you see that the image tag is selected. To the left of this, there is a <table> tag. Select it as shown in Figure 43 below.

    Selecting the table tag in the Tag selector

    Figure 43. Selecting the table tag in the Tag selector

    You should now see the table selected in Design view.

    The table selected in Design view

    Figure 44. The table selected in Design view

  3. Now that the <table> tag is selected, go to the Property inspector and select Convert Widths to Pixels as shown in Figure 45 below.

    Converting widths to pixels in the Property inspector

    Figure 45. Converting widths to pixels in the Property inspector

    This adds width tags to the table cells: <td width="41">. This will ensure that when you remove the Navbar sliced image, the table that holds the image stay correctly formatted.

    Note: Widths in <td> tags are a deprecated property of the <td> tag. However, it will still validate as valid HTML per www.w3.org. If you wish, you can use spacer images instead of specifying widths in table cells. You just need to ensure that your table does not fall apart once you remove the Navbar sliced image.

  4. Select the Navbar image again and press the Delete key on your keyboard.

    The Navbar with the Navbar image removed

    Figure 46. The Navbar with the Navbar image removed

  5. Place the cursor inside the table cell of the Navbar image you just deleted, go to the Property inspector, and change the background color to #FFFFFF.

Perform the same steps to remove the Main Content and Right Column sliced images. In this case, both the Main Content and Right Column sliced images reside in the same table.

  1. Select the Main Content sliced image.
  2. With the Main Content sliced image selected, look at the bottom of the document where you see that the image tag is selected. To the left of this, there is a <table> tag. Select it.
  3. Now that you have selected the <table> tag, go to the Property inspector and select Convert Widths to Pixels as shown in Figure 47 below.

    Converting widths to pixels in the Property inspector

    Figure 47. Converting widths to pixels in the Property inspector

  4. Select the Main Content image again and press the Delete key on your keyboard.
  5. Select the Right Column image again and press the Delete key on your keyboard.

    The interface with the main and right content images removed

    Figure 48. The interface with the main and right content images removed

  6. Place the cursor inside the table cell of the Main Content, go to the Property inspector, and change the background color to #FFFFFF.
  7. Place the cursor inside the table cell of the Right Column, go to the Property inspector, and change the background color to #FFFFFF.

So far, you have set up the interface so that you could add content to the Navbar, Main Content, and Right Column table cells. But, you have two problems you must deal with. The first problem is that you have nested tables three deep. This is completely unnecessary. The second problem is you still need to set up your layout so that you have tiled images. We'll address the first problem of nested tables.

Removing Nested Tables

You do not need to perform this next task of removing nested tables, although it is recommended. If you prefer, you can skip this section and continue to the next section Tiling Images.

I try to use the rule of: Don't use nested tables unnecessarily. In fact, I will try not to use nested tables when possible. But sometimes you need to use them; don't sweat it if you have to use them. Because you chose to have Fireworks export it's HTML as nested tables, you need to clean up a bit.

Note: I chose to use nested tables as it is much easier to edit the HTML rather the exporting with spacers, single table, so forth … I recommend exporting the Fireworks HTML, as Nested tables—no spacers. However, you can experiment. You may find that doing it another way works better for you, it's your preference. There is no right way or wrong way.

To remove the unwanted nested tables, select the nested tables, and cut and paste them outside of the original Fireworks generated table.

  1. Select the very first image at the top left of the interface as sown in Figure 49 below.

    Selecting the top left image

    Figure 49. Selecting the top left image

    Go to the bottom of the document window and select the <table> tag furthest to the right as shown in Figure 50 below. This is the nested table you will to cut and paste.

    Selecting the table tag to copy and paste

    Figure 50. Selecting the table tag to copy and paste

  2. In the Property inspector and set Align to Default.
  3. Go to the main menu and select Edit > Cut.
  4. Place your cursor outside and to the left of the Fireworks HTML generated table.
  5. Go to the main menu and select Edit > Paste.

    The pasted table should sit above the main table as shown in Figure 51 below.

    Pasting the nested table in the main table

    Figure 51. Pasting the nested table in the main table

  6. Select the table that holds the Navbar as shown in Figure 52 below.

    Selecting the table that holds the Navbar

    Figure 52. Selecting the table that holds the Navbar

  7. In the Property inspector, set Align to Default.
  8. Go to the main menu and select Edit > Cut.
  9. Place your cursor outside and to the left of the Fireworks HTML generated table.
  10. Paste the Navbar table so that it is pasted above the Fireworks HTML generated table as shown in Figure 53 below.

    Pasting the Navbar table

    Figure 53. Pasting the Navbar table

  11. Select the table that holds the Main Content table as shown in Figure 54 below.

    Selecting the table that holds the “Main Content” table

    Figure 54. Selecting the table that holds the Main Content table

  12. In the Property inspector, set Align to Default.
  13. Go to the main menu and select Edit > Cut.
  14. Place your cursor outside and to the left of the Fireworks HTML generated table
  15. Paste the Navbar table so that it is pasted above the Fireworks HTML generated table as shown in Figure 55 below.

    Pasting the Navbar table

    Figure 55. Pasting the Navbar table

That takes care of the nested tables. However, you left two sliced images in the original Fireworks–generated table.

You can fix this by adding table rows to a couple of the pasted tables.

  1. Select the table that holds the Navbar as shown in Figure 56 below.

    Selecting the table that holds the Navbar

    Figure 56. Selecting the table that holds the Navbar

  2. Go to the Property inspector and change the Rows text box from 1 to 2. This will add an additional row to the table.

    Changing the rows text box from 1 to 2 to add an additional row to the table

    Figure 57. Changing the rows text box from 1 to 2 to add an additional row to the table

  3. Click inside any of the cells of the new row
  4. Go to the bottom of the document window and select the <tr> tag.
  5. In the Property inspector, click the icon shown in Figure 58 below. This will convert the cells in the row to one column span.

    Converting the cells in the row to one column span

    Figure 58. Converting the cells in the row to one column span

  6. Select the image that divides the Navbar and the Main Content area as shown in Figure 59 below.

    Selecting the image that divides the Navbar and the Main Content areas

    Figure 59. Selecting the image that divides the Navbar and the Main Content areas

  7. Go to the main menu and select Edit > Cut.
  8. Place your cursor inside the row that you merged into a column span.
  9. Go to the main menu and select Edit > Paste.

    Your tables should look like Figure 60 below.

    The completed tables

    Figure 60. The completed tables

    You now need to do the same with the remaining sliced images.

  1. Select the Main Content table.
  2. In the Property inspector, change the Rows value from 1 to 2. This adds a new row to the table.
  3. Click inside any of the cells of the new row.
  4. Go to the bottom of the document window and select the <tr> tag.
  5. In the Property inspector, click the icon shown in Figure 61 below. This will convert the cells in the row to one column span.

    Converting the cells in the row to one column span

    Figure 61. Converting the cells in the row to one column span

  6. Select the remaining image (footer) in the original Fireworks table.
  7. Go to the main menu and select Edit > Cut.
  8. Place your cursor inside the row that you just merged into a column span.
  9. Go to the main menu and select Edit > Paste.

That takes care of most of the nested tables. You can delete the empty table below the interface by selecting it and pressing the Delete key on your keyboard.

You are almost done. Hang in there!

Tiling Images

To illustrate what you still need to do, go ahead and add several paragraph tags to the main content table cell.

 Adding paragraph tags to show the broken tiles

Figure 62. Adding paragraph tags to show the broken tiles

As you can see from Figure 62 above, the interface falls apart when you add several paragraph tags to expand the tables vertically. You can correct this by further editing. Tile the predefined sliced images created in the Slicing and Exporting section. I created three slices named lefttile.jpg, middletile.jpg, and righttile.jpg. Use these images in a vertical tile, and this will eliminate the gaps created when you added the paragraph tags. For now, leave those paragraph tags. This will help you to see where are gaps are while you edit a bit more.

Before you start, I want to mention that you have two methods to choose from when tiling images in table cells. One is embedding the tiled images in a table cell (Example: <td background="assets/images/lefttile.jpg">) and the other is using CSS.

Embedding the image in a table cell has one drawback. It is not valid HTML. However, even though this method is not valid, it does render on all 4.0 version browsers and above. You lose nothing other than validation. To me, there is nothing wrong with this method. I still use images embedded in table cells when I need to support Netscape 4x. If you don't care about supporting Netscape 4x and you want valid HTML, then you will want to use CSS for tiled images. For this article, you will use CSS.

  1. Select the left image as shown in Figure 63 below.

    Selecting the left image

    Figure 63. Selecting the left image

  2. Go to the bottom of the document window and select the <table> tag furthest to the right as shown in Figure 64 below.

    Selecting the table tag

    Figure 64. Selecting the table tag

  3. Press the Delete key on your keyboard. This will remove the nested table and the images.
  4. Go to the Design panel and select the CSS tab. If the deign panel is not open, go to the main menu and select Window > CSS Styles.

    Creating a new CSS style in the CSS Styles panel

    Figure 65. Creating a new CSS style in the CSS Styles panel

  5. In the lower right corner of the CSS Styles tab, click on the plus (+) symbol. This will create a new style that you can define.
  6. In the name field, name the style lefttile.
  7. For the Selector type select, Class (can apply to any tag).
  8. For Define in, select This document only and select OK.

    Setting the attributes for the new CSS style

    Figure 66. Setting the attributes for the new CSS style

  9. The CSS Style definition dialog box appears. From the Category column to the left, select Background.
  10. In the Background Image field, browse to the file lefttile.jpg as shown below. The lefttile.jpg file is included in the sample files you downloaded at the beginning of this article.

    Setting the background images for the CSS style

    Figure 67. Setting the background images for the CSS style

  11. Click OK.

  12. You have just added a new Style definition to your CSS style panel you named lefttile.jpg. This style gets added to the document and can be viewed in code view between the <head> tags

  13. Place your cursor inside the empty cell on the left side of our interface.
  14. Go to the Property inspector, click the Style pop-up menu, select lefttile.jpg, select the Vert pop-up menu, and choose Top.

    Applying the lefttile style in the Property inspector

    Figure 68. Applying the lefttile style in the Property inspector

  15. With your cursor still inside the cell, go to the main menu and select Insert > Image.
  16. Browse to the image named maincontentleft.jpg and click OK. Note: Dreamweaver MX 2004 will ask you to set the Alternate Text. From the pop-up menu, select Empty and click OK.

    That completes setting up the tiling for the left side.

    The completed CSS settings for the left side tiling

    Figure 69. The completed CSS settings for the left side tiling

Next, complete the middle graphic tile by defining the CSS style.

  1. In the lower right corner of the CSS Styles tab, click the plus (+) symbol.
  2. In the name field, name the style middletile.
  3. For the Selector type, select Class (can apply to any tag).
  4. For the Define in, select This document only and click OK.
  5. The CSS Style definition dialog box appears. From the Category column to the left, select Background.
  6. In the Background Image field, browse to the file middletile.jpg and click OK.
  7. Place your cursor inside the cell where the middletile.jpg image currently sits.
  8. Go to the Property inspector and click the Style pop-up menu and select middletile.

That completes the middle divider tiling.

  1. In the lower right corner of the CSS Styles tab, click the plus (+) symbol.
  2. In the name field, name the style righttile.
  3. For the Selector type, select Class (can apply to any tag).
  4. For the Define in, select This document only and click OK.
  5. The CSS Style definition dialog box appears. From the Category column to the left, select Background.
  6. In the Background Image field, browse to the file righttile.jpg.
  7. Click OK.
  8. Place your cursor inside the empty cell on the right side of the interface.
  9. Go to the Property inspector and click the Style pop-up menu, select righttile, select the Vert pop-up menu, and choose Top.
  10. With your cursor still inside the cell, go to the main menu and select Insert > Image.
  11. Browse to the image named maincontentright.jpg and select OK.

Guess what? You are done! All that is left to do is add content.

Summary

As you can see, both Fireworks MX 2004 and Dreamweaver MX 2004 can be valuable tools in creating complex designs with ease and speed. It is my hope that what you have learned here will be helpful to you in your projects.


About the author

Joey Durham is a Senior Designer at Chicago-based TeamWorks Media .  Durham , a Team Macromedia member, is also a Fireworks and Dreamweaver enthusiast and has written several tutorials on these products.  Additionally, he hosts an exchange for Fireworks PNG source files at www.ultraweaver.com . His most recent personal project, www.geekforum.com , is a resource for both designers and developers who are looking for inspiration and/or technical knowledge. In the rare moments when Durham is not working, he spends his free time with his wife Erika and daughter Olivia. Joey resides in Indianapolis,Indiana.